// 车辆管理-车型管理
import request from '@/utils/request'

// 获取车辆类型信息列表
export const getCarModelsList = () => {
  return request({
    url: 'manager/truckType/simple'
  })
}
// 添加车辆类型
export const addCarModels = (data) => {
  return request({
    url: '/manager/truckType',
    method: 'post',
    data
  })
}
// 删除
export const delCarModels = (id) => {
  return request({
    url: `/manager/truckType/${id}`,
    method: 'delete'
  })
}
// 获取车辆类型分页数据(搜索功能)
export const getCarModels = (params) => {
  return request({
    url: '/manager/truckType/page',
    params
  })
}
// 获取车型详情
export const getCarModelsDetail = (id) => {
  return request({
    url: `/manager/truckType/${id}`
  })
}
// 编辑车型
export const editCarModels = (data) => {
  return request({
    url: `/manager/truckType/${data.id}`,
    method: 'put',
    data
  })
}
